<template>
  <div class="my-share">
      <div class="ch-chiak">
        <h2>My chiak</h2>
        <div class=" ch-fakeimg">
          <img src="../assets/touxiang.jpg" class="img-mycp">
        </div>
          <h3>{{text.new_title}}</h3>
          <hr class="hidden-sm hidden-md hidden-lg">
      </div>
      <div class="ch-text" v-html="text.new_content">
      </div>
  </div>
</template>

<script>
import qs from 'qs'
export default {
  name: 'share',
  data () {
    return {
      id: this.$route.params.id,
      text: ''
    }
  },
  beforeUpdate () {
  },
  mounted () {
    this.getnewtext()
  },
  methods: {
    getnewtext () {
      console.log(this.id)
      this.$axios.post('http://www.chiak.top/index/getnew.php', qs.stringify({id: this.id}))
        .then((response) => {
          console.log(response)
          this.text = response.data.text[0]
        })
        .catch((error) => {
          console.log(error)
        })
    }
  },
  watch: {
  }
}
</script>

<style scoped>
  .my-share{
      max-width: 800px;
      margin: 20px auto 0;
    }
    .ch-res{
      max-width: 800px;
      margin: 20px auto 0;
      padding: 10px;
      margin-bottom: 100px;
      border: 1px solid #e1dbdb;
      box-shadow: 10px 10px 5px #888888;
    }
    .ch-introduce h5{
      padding-left: 5px;
      font-weight: bold;
      margin-top: 30px;
      margin-bottom:  30px;
      font-size: 1.25rem;
      text-align: left;
      border-left: 8px solid #089b5f;
      background-color: #ffffff;
    }
    .ch-chiak{
      text-align: center;
      margin-bottom: 50px;
    }
    .ch-fakeimg img{
      width: 200px;
      height: 200px;
      border-radius: 50%;
    }
    .ch-text{
      text-align: left;
    }
</style>
